import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home'
import Team from '@/pages/Team'
import Project from '@/pages/Project'
import Introduce from '@/pages/Introduce'
Vue.use(Router)

var router=new Router({
  //mode: 'history',
  routes: [
    {
      path: '/',
      redirect: { name: 'Home' }
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/team',
      name: 'Team',
      component: Team
    },
    {
      path: '/project',
      name: 'Project',
      component: Project
    },
    {
      path: '/introduce',
      name: 'Introduce',
      component: Introduce
    }
  ]
})
router.afterEach(() => {
  document.body.scrollTop = 0;
  document.documentElement.scrollTop = 0;
})
export default router;
